<template>
  <div class="userInfo">
    <van-nav-bar
      title="基本信息"
      left-arrow
      @click-left="$router.go(-1)"
    />
    <div class="list">
      <div>
        <div class="left"><span style='color:red'>*</span>头像</div>
        <div class="right">
          <img src="" alt="">
        </div>
      </div>
    </div>
    <div class="list">
      <div>
        <div class="left"><span style='color:red'>*</span>昵称</div>
        <div class="right"> <van-search v-model="user.name" left-icon=''/> </div>
      </div>
      <div >
        <div class="left"><span style='color:red'>*</span>性别</div>
        <div class="right"> 
          {{user.sex == 0 ?'男':'女'}}
          <van-icon name="arrow" />
        </div>
      </div>
    </div>
    <div class="list">
      <div>
        <div class="left"><span style='color:red'>*</span>我的二维码</div>
        <div class="right"> 
          <img src="" alt="">
          <van-icon name="arrow" />
        </div>
      </div>
      <div >
        <div class="left"><span style='color:red'>*</span>手机号</div>
        <div class="right"> 
          {{user.phone}}
        </div>
      </div>
    </div>
    <div class="success">
      <button @click="submit">完成</button>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        user: {
          name:'你是谁',
          sex:'0',
          phone:'18988883333',
          code:''
        }
      }
    },
    methods: {
      submit() {
        console.log()
      }
    },
  }
</script>

<style scoped lang='less'>
  .userInfo{
    background-color: #e6e6e6;
    min-height: 100vh;
    .van-nav-bar{
      background-color: #5cadff;
      .van-icon{
        color: white;
      }
      .van-nav-bar__title{
        color: white;
      }
    }
    .list{
      margin-bottom: 10px;
      >div{
        border-bottom: 1px solid #e1e1e1;
        background-color: white;
        display: flex;
        padding: 0 20px ;
        justify-content: space-between;
        align-items: center;
        .left{
          width: 20%;
        }
        .right{
          height: 50px;
          line-height: 50px;
          width: 50%;
          text-align: right;
        }
      }
     
    }
    .success{
      text-align: center;
      button{
        border: none;
        width: 80%;
        color: white;
        padding: 10px 0;
        background-color: #3399ff;
      }
    }
  }
</style>